<?php

namespace Common\Service;

/** 
 * 图标包
 * @author Legend. <xcx_legender@qq.com>
 * @param 
 * @return 
 */

Class IconPacksService extends BaseService
{


	/** 
	 	used:
	 	id
		name, type, detail
		
		pre: 
		download_url 

	 */

 	const ERROR_NAME  = '标题不能为空';
	const ERROR_TYPE  = '类型错误';

	protected $_validate = array(
		array('name', 'require', self::ERROR_NAME, self::MUST_VALIDATE , 'regex', self::MODEL_BOTH),
		array('type', 'require', self::ERROR_TYPE, self::MUST_VALIDATE , 'regex', self::MODEL_BOTH),
 	);

	protected $_auto = array(
        array('name', 'htmlspecialchars', self::MODEL_BOTH, 'function'),
        array('create_time', NOW_TIME, self::MODEL_INSERT),
        array('update_time', NOW_TIME, self::MODEL_BOTH),
        array('status', 1, self::MODEL_BOTH),
        array('status', 'intval', self::MODEL_BOTH, 'function'),
    ); 
	


}